<?php
/*
 * Created on Jan 3, 2008
 *
 * To change the template for this generated file go to
 * Window - Preferences - PHPeclipse - PHP - Code Templates
 */
require('./View/Security.php');
require('./View/BoxView.php');
require('./View/ViewFunctions.php');
require('./Model/SpecalizedInserts.php');
require('./Controller/UpdateBackEnd.php');
 $tank = $_GET['tank'];
 $tower =$_GET['tower'];
 unset($_GET['tank']);
 unset($_GET['tower']);
  $query = "SELECT id FROM Container WHERE Tank=\"$tank\" ";
  if($tower != "" ) { $query .= "AND Tower=\"$tower\""; }
  $result = mysql_query($query);
	
while($line = mysql_fetch_array($result, MYSQL_ASSOC)) {

	$_GET['ContainerID'] = $line['id'];
	$query = "SELECT CellType.ID AS \"CellTypeID\", CellType.Name AS 'Cell Name', Modification.id AS \"ModificationID\", Modification.Name 'Modification Name', Researcher.ID AS \"ResearcherID\", Researcher.Name, FrozenTube.Location, FrozenTube.ContainerID, FrozenTube.id FROM FrozenTube JOIN CellType ON (FrozenTube.CellTypeID=CellType.ID) JOIN Modification ON (FrozenTube.ModifiedByID=Modification.ID) JOIN Researcher ON ( FrozenTube.FrozenByID=Researcher.ID) WHERE FrozenTube.ContainerID="; 
	$query .= $line['id'];
	$query .= " ORDER BY Location ASC";
	$boxResult = mysql_query($query) or die('Query failed in View Box: ' . mysql_error() . "Query: $query");
	//Edit the URL's below to edit where the links on the box page go to'
	$select .= CreateBoxView($boxResult, array('CellTypeID' => 'ViewGeneric.php', 'ModificationID' => 'ViewGeneric.php', 'ResearcherID' => 'ViewGeneric.php'));
	$select .= "</br>";
}
?>
<BUTTON type="button" name="Print" onclick="print()">Print </button>
<?php echo $select ?>